﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Castle.ActiveRecord;
using NHibernate.Criterion;
using LIB;
using System.Collections;

public partial class thong_tin_du_an : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            if (!IsPostBack)
                bindCat();
        }
        catch (Exception ex) { }
    }
    protected void bindCat()
    {
        repList.DataSource = Category_Info.FindAll(Order.Asc("catOrder"), Expression.Eq("catParentID", Category_Info.Find(179)));
        repList.DataBind();
    }
    protected void repList_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        HiddenField hidCatID = (HiddenField)e.Item.FindControl("hidCatID");
        Repeater repListContent = (Repeater)e.Item.FindControl("repListContent");
        Order[] orders = new Order[] { new Order("id", false) };
        repListContent.DataSource = Content_Info.SlicedFindAll(0, 4, orders, Expression.Eq("contentCatID", Category_Info.Find(ConvertUtility.ToInt32(hidCatID.Value))));
        repListContent.DataBind();
    }
}